def make_chocolate(small, big, goal):
 if small>=4:
   if goal>small+5*big:
     return -1
   return max ( goal % 5, goal-5*big)
 else:
    if goal%5>small:
      return -1
    return goal%5
     